﻿using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Visual
{
    [XmlRoot("tile", Namespace = Constants.Main)]
    public class Tile : XmlSerializable, IFillModeProperty
    {
        [Optional]
        [XmlAttribute("tx", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> HorizontalOffset { get; set; }

        [Optional]
        [XmlAttribute("ty", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> VerticalOffset { get; set; }

        [Optional]
        [XmlAttribute("sx", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> HorizontalRatio { get; set; }

        [Optional]
        [XmlAttribute("sy", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> VerticalRatio { get; set; }

        [Optional]
        [XmlAttribute("flip", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_TileFlipMode> Flip { get; set; }

        [Optional]
        [XmlAttribute("align", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_RectAlignment> Alignment { get; set; }

        public Tile() { }
    }
}
